<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/public/taglib.jsp"%> 
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>系统首页</title>
  <meta name="renderer" content="webkit"> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">  
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> 
  <meta name="apple-mobile-web-app-status-bar-style" content="black"> 
  <meta name="apple-mobile-web-app-capable" content="yes">  
  <meta name="format-detection" content="telephone=no"> 
<link rel="stylesheet" href="/plugins/layui/css/layui.css" media="all" /> 
	<link rel="stylesheet" href="//at.alicdn.com/t/font_389729_wmi7opkumfluwhfr.css" media="all" />
	<link rel="stylesheet" type="text/css" href="/css/common/main.css" media="all"> 
</head>
<body  class="childrenBody">
   <div class="panel_box row">
		<div class="panel col">
			<a href="javascript:;" data-url="page/message/message.html">
				<div class="panel_icon">
					<i class="iconfont  icon-rencai" ></i>
				</div>
				<div class="panel_word newMessage">
					<span><c:if test="${fn:length(lrjllist) > 0}">
					${lrjllist.get(0).totalResults}
					</c:if>
					<c:if test="${fn:length(lrjllist) < 1}">
					0
					</c:if></span>
					<cite>今日新增人才</cite>
				</div>
			</a>
		</div>
		<div class="panel col">
			<a href="javascript:;" data-url="page/user/allUsers.html">
				<div class="panel_icon" style="background-color:#2F4056;">
					<i class="iconfont icon-wodeqiye"  ></i>
				</div>
				<div class="panel_word userAll">
					<span><c:if test="${fn:length(lrkhlist) > 0}">
						${lrkhlist.get(0).totalResults}
					</c:if>
					<c:if test="${fn:length(lrkhlist) < 1}">
						0
					</c:if></span>
					<cite>今日新增企业</cite>
				</div>
			</a>
		</div>
		<div class="panel col">
			<a href="javascript:;" data-url="page/user/allUsers.html">
				<div class="panel_icon" style="background-color:#009688;">
					<i class="iconfont icon-yuyue"  ></i>
				</div>
				<div class="panel_word userAll">
					<span><c:if test="${fn:length(yykhlist) > 0}">
					${yykhlist.get(0).totalResults}
					</c:if>
					<c:if test="${fn:length(yykhlist) < 1}">
					0
					</c:if></span>
					<cite>明日预约客户</cite>
				</div>
			</a>
		</div>
		<div class="panel col">
			<a href="javascript:;" data-url="page/img/images.html">
				<div class="panel_icon" style="background-color:#5FB878;">
					<i class="iconfont icon-lianxifangshilogo" > </i>
				</div>
				<div class="panel_word imgAll">
					<span><c:if test="${fn:length(lxkhlist) > 0}">
					${lxkhlist.get(0).totalResults}
					</c:if>
					<c:if test="${fn:length(lxkhlist) < 1}">
					0
					</c:if></span>
					<cite>今日联系客户</cite>
				</div>
			</a>
		</div>
		<div class="panel col">
			<a href="javascript:;" data-url="page/news/newsList.html">
				<div class="panel_icon" style="background-color:#F7B824;">
					<i class="iconfont icon-hetongguizeguankong2"  ></i>
				</div>
				<div class="panel_word waitNews">
					<span>${contractCount}</span>
					<cite>今日签单数</cite>
				</div>
			</a>
		</div>
		<div class="panel col max_panel">
			<a href="javascript:;" data-url="page/news/newsList.html">
				<div class="panel_icon" style="background-color:#FF5722;">
					<i class="iconfont icon-Performance"  ></i>
				</div>
				<div class="panel_word allNews">
					<span>${totalmoneyFromDays}</span>
					  <em>今日业绩</em>  
					<cite>今日业绩</cite>
				</div>
			</a>
		</div>
	</div>
 
	<div class="row">
		<div class="sysNoticeOne col">
			<blockquote class="layui-elem-quote title"><i class="iconfont icon-hangzhenggonggao"  style="font-size: 23px;margin-right:5px;color:red" ></i> <b>系统公告</b></blockquote>
			<table class="layui-table" lay-skin="line">
				<colgroup>
					<col>
					<col width="110">
				</colgroup>
				<tbody class="hot_news">
					<tr>
						<td align="left">暂无系统公告信息</td>
						<td></td>
					</tr> 
				</tbody>
			</table>
			
			<blockquote class="layui-elem-quote title"><i class="iconfont icon-customerservice_fill"  style="font-size: 26px;margin-right:5px;color:#10a4f3" ></i><b>今日电话排行</b></blockquote>
			<table class="layui-table" lay-skin="line">
				<colgroup>
					<col width="10">
					<col width="150">
					<col>
				</colgroup>
				<tbody>
				  <c:forEach items="${calllist}" var="clog"  varStatus="count">
				  	<c:if test="${count.count<11}">
				  			<c:if test="${count.count==10}">
				  					<tr>
										<td><i class="iconfont icon-1"  style="margin-left:1px;color:#FF8000" ></i><i class="iconfont icon-0"  style="margin-left:-5px;color:#FF8000" ></i></td>
										<td class="version">${clog.userInfo.name}</td>
										   <td class="version">${clog.startTime} <i class="iconfont icon-time"  style="margin-left:1px;color:#666" ></i></td>
									</tr>
				  			</c:if> 
				  			<c:if test="${count.count!=10}"> 
				  				<tr>
									<td><c:if test="${count.count<4}"><img src="/images/order/${count.count}.png"  ></c:if><c:if test="${count.count>3}"><i class="iconfont icon-${count.count}"  style="margin-left:15px;color:#FF8000" ></i></c:if></td>
									<td class="version">${clog.userInfo.name}</td>
								     <td class="version"  style="text-align:right">${clog.startTime} <i class="iconfont icon-time"  style="margin-left:1px;color:#666" ></i></td>
								</tr> 
				  			</c:if> 
				  	</c:if> 
				  </c:forEach> 
				 
				</tbody>
			</table>
			
			
			<blockquote class="layui-elem-quote title"><i class="iconfont icon-paihangbang"  style="font-size: 23px;margin-right:5px;color:#FFD700" ></i><b>当月业绩排行</b></blockquote>
			<table class="layui-table" lay-skin="line">
				<colgroup>
					<col width="10">
					<col width="150">
					<col>
				</colgroup>
				<tbody>
				  <c:forEach items="${allUserPerformancelist}" var="us"  varStatus="count">
				  	<c:if test="${count.count<11}">
				  			<c:if test="${count.count==10}">
				  					<tr>
										<td><i class="iconfont icon-1"  style="margin-left:1px;color:#FF8000" ></i><i class="iconfont icon-0"  style="margin-left:-5px;color:#FF8000" ></i></td>
										<td class="version">${us.userInfo.name}</td>
										   <td class="version"><fmt:formatNumber value="${us.money}" pattern="#,#00"/> <i class="iconfont icon-money"  style="margin-left:1px;color:#FF8000" ></i></td>
									</tr>
				  			</c:if> 
				  			<c:if test="${count.count!=10}"> 
				  				<tr>
									<td><c:if test="${count.count<4}"><img src="/images/order/${count.count}.png"  ></c:if><c:if test="${count.count>3}"><i class="iconfont icon-${count.count}"  style="margin-left:15px;color:#FF8000" ></i></c:if></td>
									<td class="version">${us.userInfo.name}</td>
								     <td class="version"  style="text-align:right"><fmt:formatNumber value="${us.money}" pattern="#,#00"/> <i class="iconfont icon-money"  style="margin-left:1px;color:#FF8000" ></i></td>
								</tr> 
				  			</c:if> 
				  	</c:if> 
				  </c:forEach> 
				 
				</tbody>
			</table>
			

			
		</div>
		<div class="sysNotice col">
			<blockquote class="layui-elem-quote title"><i class="iconfont icon-89"  style="font-size: 25px;margin-right:5px;color:#FF9912" ></i><b>我的业绩</b></blockquote>
			<div class="layui-elem-quote layui-quote-nm">
			          <div class="larry-seo-stats"   style="width:100%;height:300px;" id="larry-seo-stats"></div>
			</div>
	 
			<blockquote class="layui-elem-quote title  "><i class="iconfont icon-fenxi2"  style="font-size: 25px;margin-right:5px;" ></i><b>我的业绩分析</b></blockquote>
			<div class="layui-elem-quote layui-quote-nm">
			
               <div class="layui-progress layui-progress-big layui-progress-one">
                             <div class="layui-progress-bar" id="layui-progress-two" lay-percent="20%"><fmt:formatNumber value='${yj.get("min")}' pattern="#,#00"/>元</div>
                           </div>
               	<p></p>
               	<p></p>
               	<p></p>
               		<h3>月最低业绩统计</h3>
               
			    <p> 
			               <div class="layui-progress layui-progress-big layui-progress-one">
                                <div class="layui-progress-bar layui-bg-blue" id="layui-progress-two" lay-percent="50%"><fmt:formatNumber value='${yj.get("pj")}' pattern="#,#00"/>元</div>
                              </div>
                    </p>
                   	<h3>月平均业绩统计</h3> 
                  
			       <p> 
			             <div class="layui-progress layui-progress-big layui-progress-one">
                                <div class="layui-progress-bar layui-bg-red" id="layui-progress-two" lay-percent="100%"><fmt:formatNumber value='${yj.get("max")}' pattern="#,#00"/>元</div>
                              </div>
                    </p>
                    <h3>月最高业绩统计</h3>
                     
			</div>
		</div>
		
	</div>
   
	 
<script type="text/javascript" src="/plugins/layui/layui.js"></script>
<script type="text/javascript">
	layui.use(['jquery','layer','element'],function(){
		window.jQuery = window.$ = layui.jquery;
		window.layer = layui.layer;
        window.element = layui.element();

    /*    $('.panel .tools .iconpx-chevron-down').click(function(){
       	   var el = $(this).parents(".panel").children(".panel-body");
       	   if($(this).hasClass("iconpx-chevron-down")){
       	   	   $(this).removeClass("iconpx-chevron-down").addClass("iconpx-chevron-up");
       	   	   el.slideUp(200);
       	   }else{
       	   	   $(this).removeClass("iconpx-chevron-up").addClass("iconpx-chevron-down");
       	   	   el.slideDown(200);
       	   }
       }) */
       $.ajax({
 			type : "get",
 			url : "/sys/message",
 			async:false,
 			dataType : "json",
 			success : function(data){
 				result = data;
 				var template ='<tr><td align="left">{msg}</td><td>{time}</td></tr>';
 				if(result!=null&&result.length>0){
 					 var html ="";
 					 for(var i=0;i<result.length;i++){
 						 if(i>7){
 							 break;
 						 }
 						 html +=template.replace("{msg}",result[i].content).replace("{time}",result[i].createdate.substring(0,10));
 					 }
 					 $(".hot_news").html(html);
 				}
 			}
 		}); 
        
       

	});
</script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script type="text/javascript" src="/js/echarts.min.js"></script>
<!-- <script type="text/javascript" src="js/main.js"></script> -->
<script type="text/javascript">

  var myChart = echarts.init(document.getElementById('larry-seo-stats'));
myChart.title = '业绩统计';

option = {
    color: ['#3398DB'],
    tooltip : {
        trigger: 'axis',
        axisPointer : {            // 坐标轴指示器，坐标轴触发有效
            type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
        }
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis : [
        {
            type : 'category',
            data : ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
            axisTick: {
                alignWithLabel: true
            }
        }
    ],
    yAxis : [
        {
            type : 'value'
        }
    ],
    series : [
        {
            name:'业绩金额（元）',
            type:'bar',
            barWidth: '60%',
            data:${yj.get("yjjson")}
        }
    ]
};
myChart.setOption(option);   
 
</script>
 
</body>
</html>
 